package com.yugao.fintech.draper.hazelcast.config;

import com.hazelcast.core.HazelcastInstance;
import com.yugao.fintech.draper.hazelcast.support.HazelcastBaseFactory;
import com.yugao.fintech.draper.hazelcast.support.HazelcastProperties;
import com.yugao.fintech.draper.hazelcast.base.DistributedBaseFactory;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties(HazelcastProperties.class)
@AutoConfiguration
public class HazelcastBaseAutoConfiguration {
	@Bean
	DistributedBaseFactory distributedBaseFactory(HazelcastInstance instance) {
		return new HazelcastBaseFactory(instance);
	}
}